<?php
namespace DaChongQing\Controller;
use Think\Controller;
class TestController extends Controller
{
    public function index()
    {
        
    $openid=M("user_info")->where("nickname like '安强'")->getField("openid");
    $bonus=100;
    
     //$pay = new BonusController($openid,$bonus);
   /*  $md5sign = $pay->SetSign();
                    $parameters = array(
                        'nonce_str' => '123123131231321',
                        'sign' => $md5sign,
                        'mch_billno' => $pay->wxMchBillno('1252370801'),
                        'mch_id' => C('MCH_ID'),
                        'wxappid' => 'wx22c589512a2d5f61',
                        'nick_name' => '我爱大重庆',
                        'send_name' => '我爱大重庆',
                        're_openid' => $openid,
                        'total_amount' => $bonus,
                        'min_value' => $bonus,
                        'max_value' => $bonus,
                        'total_num' => '1',
                        'wishing' => '恭喜发财！',
                        'client_ip' => '121.40.30.107',
                        'act_name' => '恭喜发财',
                        'remark' => '恭喜发财'
                    );
                    $url = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack';
                    dump($pay->wxHttpsRequestPem($url,$pay->wxArrayToXml($parameters)));     */       
      $chat="我是大强，给你发个红包";              
   dump(sendbonus($openid,$bonus));






    }

public function get()
{

$where=array(

"sign_time"=>array("gt",strtotime(date("Y-m-d")))

	);
$data=M("user_sign")->where($where)->select();

echo count($data);







}



















}

?>